package com.acme.bankapp.domain.bank;

/**
 * Account operating only with own balance.
 */
public class SavingAccount extends AbstractAccount {

    /**
     * Constucts Saving account
     * @param amount Initial balance
     */
    public SavingAccount(double amount) {
        super(amount);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public double maximumAmountToWithdraw() {
        return getBalance() > 0 ? getBalance() : 0;
    }
}
